package entities;


	import javax.swing.*;

import clases.Cliente;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;

	public class PanelFichaCliente extends JPanel{
			
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		
		private JLabel lblCIF;
		private JLabel lblRazonSocial;
		private JLabel lblDireccion;
		private JLabel lblCodigoPostal;
		private JLabel lblTlf;
		private JLabel lblFax;
		private JLabel lblEmail;
		
		private JLabel lblCIF2;
		private JLabel lblRazonSocial2;
		private JLabel lblDireccion2;
		private JLabel lblCodigoPostal2;
		private JLabel lblTlf2;
		private JLabel lblFax2;
		private JLabel Email1;
		private JLabel Email2;
		private JLabel Email3;
		
		public PanelFichaCliente(Cliente a){
			this.setSize(705,516);
			this.setVisible(true);
			
			this.setOpaque(false);
			 
			 lblRazonSocial= new JLabel("Razon Social:");
			 
			 lblDireccion= new JLabel("Direccion:");
			 			 
			 lblCodigoPostal= new JLabel("Codigo Postal:");
			 
			 lblTlf= new JLabel("Telefono:");
			 
			 lblFax= new JLabel("Fax:");
			 
			 lblEmail= new JLabel("Emails:");
			
			 
			 //----------------------------------------
			 
			
			 
			 lblCIF2= new JLabel (a.getCIF());
			 
			 lblRazonSocial2= new JLabel(a.getRazonSocial());
			 
			 lblDireccion2= new JLabel(a.getDireccion());
			 
			 lblCodigoPostal2= new JLabel(a.getCODPostal());
			 
		     lblTlf2 = new JLabel(a.getTelefono());
			 
		     lblFax2 = new JLabel(a.getFax());
		    		 
		     Email1 = new JLabel(a. getArrayEmails()[0]);
		     
		     Email2 = new JLabel(a. getArrayEmails()[1]);
		     
		     Email3 = new JLabel(a. getArrayEmails()[2]);
		     
		     lblCIF= new JLabel("CIF:");
	         GroupLayout groupLayout = new GroupLayout(this);
	         groupLayout.setHorizontalGroup(
	         	groupLayout.createParallelGroup(Alignment.LEADING)
	         		.addGroup(groupLayout.createSequentialGroup()
	         			.addGap(39)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addGroup(groupLayout.createSequentialGroup()
	         					.addComponent(lblRazonSocial, GroupLayout.PREFERRED_SIZE, 101, GroupLayout.PREFERRED_SIZE)
	         					.addGap(15)
	         					.addComponent(lblRazonSocial2, GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE)
	         					.addGap(10)
	         					.addComponent(lblFax, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE))
	         				.addGroup(groupLayout.createSequentialGroup()
	         					.addComponent(lblCIF, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)
	         					.addGap(52)
	         					.addComponent(lblCIF2, GroupLayout.PREFERRED_SIZE, 153, GroupLayout.PREFERRED_SIZE)
	         					.addPreferredGap(ComponentPlacement.RELATED)
	         					.addComponent(lblTlf, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE))
	         				.addGroup(groupLayout.createSequentialGroup()
	         					.addComponent(lblDireccion, GroupLayout.PREFERRED_SIZE, 101, GroupLayout.PREFERRED_SIZE)
	         					.addGap(15)
	         					.addComponent(lblDireccion2, GroupLayout.PREFERRED_SIZE, 153, GroupLayout.PREFERRED_SIZE)
	         					.addPreferredGap(ComponentPlacement.RELATED)
	         					.addComponent(lblEmail, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE))
	         				.addGroup(groupLayout.createSequentialGroup()
	         					.addComponent(lblCodigoPostal, GroupLayout.PREFERRED_SIZE, 101, GroupLayout.PREFERRED_SIZE)
	         					.addGap(15)
	         					.addComponent(lblCodigoPostal2, GroupLayout.PREFERRED_SIZE, 152, GroupLayout.PREFERRED_SIZE)))
	         			.addGap(28)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addComponent(Email3, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
	         				.addComponent(Email1, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
	         				.addComponent(lblTlf2, GroupLayout.PREFERRED_SIZE, 153, GroupLayout.PREFERRED_SIZE)
	         				.addComponent(lblFax2, GroupLayout.PREFERRED_SIZE, 153, GroupLayout.PREFERRED_SIZE)
	         				.addComponent(Email2, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE))
	         			.addContainerGap(73, Short.MAX_VALUE))
	         );
	         groupLayout.setVerticalGroup(
	         	groupLayout.createParallelGroup(Alignment.LEADING)
	         		.addGroup(groupLayout.createSequentialGroup()
	         			.addGap(103)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addComponent(lblCIF)
	         				.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
	         					.addComponent(lblCIF2)
	         					.addComponent(lblTlf)
	         					.addComponent(lblTlf2)))
	         			.addGap(28)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addComponent(lblRazonSocial)
	         				.addComponent(lblRazonSocial2)
	         				.addComponent(lblFax)
	         				.addComponent(lblFax2))
	         			.addGap(47)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addComponent(lblDireccion)
	         				.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
	         					.addComponent(lblDireccion2)
	         					.addComponent(lblEmail)
	         					.addComponent(Email1)))
	         			.addGap(18)
	         			.addComponent(Email2)
	         			.addGap(11)
	         			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
	         				.addComponent(lblCodigoPostal)
	         				.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
	         					.addComponent(lblCodigoPostal2)
	         					.addComponent(Email3)))
	         			.addGap(92))
	         );
	         setLayout(groupLayout);
	         
	      
		}	
		
	}


